package wh.two;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner;

public class InputNumberFromKey {
	
	 public void getInput() { 

		//get input from key or console--standard input
		//version1 
		/*
		 * Scanner sc=new Scanner(System.in); int i=sc.nextInt(); System.out.println(i);
		 * sc.close();
		 */
		
		//version2
		File f=new File("numinput.txt");
		try {
			Scanner sc=new Scanner(f);
			int[] myinput = new int[5];
			//int myinput[],i=0;
			int i = 0;
			while(sc.hasNext()) {
				//int myinput=sc.nextInt();
				myinput[i]=sc.nextInt();
				i++;
				//System.out.println(myinput);
			
			}
			Arrays.sort(myinput);
			for(i=0;i<5;i++)
			{
				System.out.println(myinput[i]);
			}
			sc.close();
			
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}




